package com.jack.blog.dao;

import com.jack.blog.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface MessageMapper {

    List<Message> queryMessages(@Param("bid") int bid);

    List<Message> queryMessagesByReply(@Param("bid") int bid, @Param("reply")boolean reply);

    Message queryMessage(@Param("id")int id);

    void insertMessage(@Param("message")Message message);

    void updateMessage(@Param("id") int id, @Param("reply")boolean reply, @Param("replyTime")Timestamp replyTime);

    void deleteMessage(@Param("id") int id);
}
